
<script>
    let data={
        "color":{},
        "img":{}
    };
    {% for block in section.blocks %}
        {% if block.type == 'text_color_block' %}
            {% if block.settings.title1 and block.settings.title1 !="" %}
                data.color["{{  block.settings.title1}}"]="{{ block.settings.bg_color1 }}"
            {% endif %}
            {% if block.settings.title2 and block.settings.title2 !="" %}
                data.color["{{  block.settings.title2}}"]="{{ block.settings.bg_color2 }}"
            {% endif %}
            {% if block.settings.title3 and block.settings.title3 !="" %}
                data.color["{{  block.settings.title3 }}"]="{{ block.settings.bg_color3 }}"
            {% endif %}
            {% if block.settings.title4 and block.settings.title4 !="" %}
                data.color["{{  block.settings.title4 }}"]="{{ block.settings.bg_color4 }}"
            {% endif %}
            {% if block.settings.title5 and block.settings.title5 !="" %}
                data.color["{{  block.settings.title5}}"]="{{ block.settings.bg_color5 }}"
            {% endif %}
        {% endif %}
        {% if block.type == 'text_image_block' %}
            {% if block.settings.heading1 and block.settings.heading1 !="" %}
                data.img["{{  block.settings.heading1}}"]="{{ block.settings.custom_image1 | img_url: 'master' }}"
            {% endif %}
            {% if block.settings.heading2 and block.settings.heading2 !="" %}
                data.img["{{  block.settings.heading2}}"]="{{ block.settings.custom_image2 | img_url: 'master' }}"
            {% endif %}
            {% if block.settings.heading3 and block.settings.heading3 !="" %}
                data.img["{{  block.settings.heading3}}"]="{{ block.settings.custom_image3 | img_url: 'master' }}"
            {% endif %}
            {% if block.settings.heading4 and block.settings.heading4 !="" %}
                data.img["{{  block.settings.heading4}}"]="{{ block.settings.custom_image4 | img_url: 'master' }}"
            {% endif %}
            {% if block.settings.heading5 and block.settings.heading5 !="" %}
                data.img["{{  block.settings.heading5}}"]="{{ block.settings.custom_image5 | img_url: 'master' }}"
            {% endif %}






        {% endif %}
    {% endfor %}
</script>
{% schema %}
{
  "name": "v1 颜色数据",
  "settings": [
 
  ],
  "blocks": [
    {
      "type": "text_color_block",
      "name": "标题与颜色模块",
      "settings": [
        {"type": "text","id": "title1","label": "模块标题 1"},
        {"type": "color","id": "bg_color1","label": "背景颜色 1","default": "#FFFFFF"},
        {"type": "text","id": "title2","label": "模块标题 2"},
        {"type": "color","id": "bg_color2","label": "背景颜色 2","default": "#FFFFFF"},
        {"type": "text","id": "title3","label": "模块标题 3"},
        {"type": "color","id": "bg_color3","label": "背景颜色 3","default": "#FFFFFF"},
        {"type": "text","id": "title4","label": "模块标题 4"},
        {"type": "color","id": "bg_color4","label": "背景颜色 4","default": "#FFFFFF"},
        {"type": "text","id": "title5","label": "模块标题 5"},
        {"type": "color","id": "bg_color5","label": "背景颜色 5","default": "#FFFFFF"}
      ]
    },
    {
      "type": "text_image_block",
      "name": "标题与图片模块",
      "settings": [
        {"type": "text","id": "heading1","label": "图片标题 1"},
        {"type": "image_picker","id": "custom_image1","label": "选择图片 1"},
        {"type": "text","id": "heading2","label": "图片标题 2"},
        {"type": "image_picker","id": "custom_image2","label": "选择图片 2"},
        {"type": "text","id": "heading3","label": "图片标题 3"},
        {"type": "image_picker","id": "custom_image3","label": "选择图片 3"},
        {"type": "text","id": "heading4","label": "图片标题 4"},
        {"type": "image_picker","id": "custom_image4","label": "选择图片 4"},
        {"type": "text","id": "heading5","label": "图片标题 5"},
        {"type": "image_picker","id": "custom_image5","label": "选择图片 5"}
      ]
    }
  ],
  "presets": [
    {
      "name": "v1 颜色数据"
    }
  ]
}
{% endschema %}
